package com.jeff.tianti.cms.service;

import com.jeff.tianti.cms.dao.ColumnInfoDaoCustom;
import com.jeff.tianti.cms.entity.ColumnInfo;
import com.jeff.tianti.cms.dao.ColumnInfoDao;
import com.jeff.tianti.cms.dto.ColumnInfoQueryDTO;
import com.jeff.tianti.common.service.CommonService;
import com.jeff.tianti.common.entity.PageModel;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author xujianfang
 * @desc ColumnInfoService类
 * @date 2017-03-16
 */
@Service
public class ColumnInfoService extends CommonService<ColumnInfo, String> {

    @Autowired
    private ColumnInfoDao columnInfoDao;

    @Autowired
    public void setColumnInfoDao(ColumnInfoDao columnInfoDao) {
        super.setCommonDao(columnInfoDao);
    }

    public PageModel<ColumnInfo> queryColumnInfoPage(ColumnInfoQueryDTO columnInfoQueryDTO) {
        return this.columnInfoDao.queryColumnInfoPage(columnInfoQueryDTO);
    }

    public List<ColumnInfo> queryColumnInfoList(ColumnInfoQueryDTO columnInfoQueryDTO) {
        return this.columnInfoDao.queryColumnInfoList(columnInfoQueryDTO);
    }

    public List<ColumnInfo> findByCodeAndId(String code, String id) {
        return this.columnInfoDao.findByCodeAndId(code, id);
    }

    public List<ColumnInfo> findByCode(String code) {
        return this.columnInfoDao.findByCode(code);
    }

    public List<ColumnInfo> findAllNoDel() {
        return this.columnInfoDao.findAllNoDel();
    }

    public List<Map<String, Object>> findColumnIdByCode(String code) {

        return this.columnInfoDao.findColumnIdByCode(code);
    }

}